#pragma once

#include "glare.gles2.Prerequisites.h"
#include "glare.gles2.GpuResourceFactory.h"
#include "glare.core.GpuBuffer.h"

namespace Glare {

	class GLES2GpuBuffer : public GpuBuffer, public GLES2GpuResourceInterface
	{
	public : GLES2GpuBuffer(GLES2GpuResourceFactory* factory, const GpuBufferDescription& description);
	public : virtual ~GLES2GpuBuffer();

	public : virtual GpuResource::Interface* _GetInterface();

	public : virtual GpuResourceFactory* GetFactory() const;

	public : virtual const GLuint& GetGLES2Id() const;
	public : virtual void _UpdateImpl(const uint& dest_sub_resource, Box* dest_box, const void* src_data, const uint& src_row_pitch, const uint& src_depth_pitch);

	private : GLES2GpuResourceFactory* _factory;
	private : GLuint _gl_buffer_id;
	};

}
